Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(batch-exports): use 1MB payload limit for http batch exports #24433

Closed
wants to merge 1 commit into from

Conversation

bretthoerner
Copy link
Contributor

@bretthoerner bretthoerner commented Aug 16, 2024

Problem

We are getting HTTP 413 from Capture when trying to migrate a user.
[Zendesk Ticket]

NOTE: Ugh, actually. We don't calculate the size until we write to disk. We could go over 2MB (because of the last event being >1MB) before we detect and flush... Probably should also bump Capture's max body size a bit like we did for rusty-hook:

.layer(RequestBodyLimitLayer::new(max_body_size)),
... But maybe this is worth trying out first.

Changes

Use 1MB limit, see comment in code.

👉 Stay up-to-date with PostHog coding conventions for a smoother review.

Does this work well for both Cloud and self-hosted?

Yes

How did you test this code?

Existing

@bretthoerner bretthoerner force-pushed the brett/http-export-size branch from 8ddcb3b to 33b3164 Compare August 16, 2024 18:45
@bretthoerner bretthoerner changed the title fix(batch-exports): use 1.9MB payload limit for http batch exports fix(batch-exports): use 1MB payload limit for http batch exports Aug 16, 2024
@bretthoerner
Copy link
Contributor Author

We shouldn't do (or need) this since we are bumping the limit capture side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants